/*
 * Created on Nov 17, 2003
 */
 
package com.unash.asn;

/**
 * @author Ashwini Gokhale
 */

public class AsnBoolean {
	private final boolean value;
	
	public AsnBoolean(boolean value){
		this.value = value;
	}//AsnBoolean
	
	
	public boolean equals(Object obj){
		if(!(obj instanceof AsnBoolean))
			return false;
		AsnBoolean objAsnBoolean = (AsnBoolean)obj;
		return (this.isValue() == objAsnBoolean.isValue());	
	}//equals
	
	
	public int hashCode(){
		final int result = 17;
		return ((this.isValue()?0:1) * result);
	}//hashCode
	
	
	public String toString(){
		return Boolean.toString(isValue());
	}//toString


	boolean isValue() {
		return value;
	}		
}//AsnBoolean